import fetch from '@/utils/fetch'

export function save(query) {
  return fetch({
    url: '/instanceInfo/save',
    method: 'POST',
    params: query
  })
}

export function update(query) {
  return fetch({
    url: '/instanceInfo/update',
    method: 'POST',
    params: query
  })
}

export function updateStatus(query) {
  return fetch({
    url: '/instanceInfo/updateStatus',
    method: 'POST',
    params: query
  })
}

export function queryInstances(query) {
  return fetch({
    url: '/instanceInfo/queryInstances',
    method: 'GET',
    params: query
  })
}

export function queryAllTypes(query) {
  return fetch({
    url: '/instanceType/queryAllTypeList',
    method: 'GET',
    params: query
  })
}

export function queryMyDomains(query) {
  return fetch({
    url: '/instanceInfo/queryMyDomains',
    method: 'GET',
    params: query
  })
}
export function queryMyTags(query) {
  return fetch({
    url: '/tagGroup/queryMyTags',
    method: 'GET',
    params: query
  })
}

export function saveBatchTag(query) {
  return fetch({
    url: '/tagGroup/saveBatchTag',
    method: 'POST',
    params: query
  })
}

export function saveTagRelat(query) {
  return fetch({
    url: '/instanceInfo/saveTagRelat',
    method: 'POST',
    params: query
  })
}

export function check(query) {
  return fetch({
    url: '/instanceInfo/check',
    method: 'GET',
    params: query
  })
}

export function queryDomains(query) {
  return fetch({
    url: '/instanceInfo/queryDomains',
    method: 'GET',
    params: query
  })
}

export function updateAlarm(query) {
  return fetch({
    url: '/instanceInfo/updateAlarm',
    method: 'POST',
    params: query
  })
}

export function updateDomainAlarm(query) {
  return fetch({
    url: '/instanceInfo/updateDomainAlarm',
    method: 'POST',
    params: query
  })
}

export function queryAlarmDefaultConfig(query) {
  return fetch({
    url: '/instanceInfo/getAlarmDefaultConfig',
    method: 'GET',
    params: query
  })
}

export function updateAlarmDefaultConfig(query) {
  return fetch({
    url: '/instanceInfo/updateAlarmDefaultConfig',
    method: 'POST',
    params: query
  })
}

export function queryAllDomains(query) {
  return fetch({
    url: '/liveFeed/point/domains',
    method: 'GET',
    params: query
  })
}

export function setAlarmConfig(query) {
  return fetch({
    url: '/liveFeed/point/setConfig',
    method: 'POST',
    params: query
  })
}

export function getAlarmConfig(query) {
  return fetch({
    url: '/liveFeed/point/getConfig',
    method: 'GET',
    params: query
  })
}

export function queryConfigTypes(query) {
  return fetch({
    url: '/liveFeed/point/queryConfigTypes2',
    method: 'GET',
    params: query
  })
}

export function queryAlarmConfigs(query) {
  return fetch({
    url: '/liveFeed/point/queryConfigs',
    method: 'GET',
    params: query
  })
}
